package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.CheckItemGroupMapper;
import com.itheima.pojo.CheckItemGroup;
import com.itheima.service.CheckItemGroupService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class CheckItemGroupServiceImpl extends ServiceImpl<CheckItemGroupMapper, CheckItemGroup> implements CheckItemGroupService {


    @Override
    public Long[] selectByGroupId(Long checkGroupId) {
        return this.baseMapper.selectByGroupId(checkGroupId);
    }

    @Override
    public boolean deleteByGroupId(Long checkGroupId) {
        QueryWrapper<CheckItemGroup> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("check_group_id",checkGroupId);
        return this.remove(queryWrapper);
    }
}
